﻿<%@ Page Language="C#" Inherits="E.Web.Teacher.student.List" %>
<%@ Import Namespace="E.Model" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>学员列表</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <%--<link rel="stylesheet" href="/css/student.css" type="text/css" media="all" />--%>
  <link rel="stylesheet" href="/css/flora.datepick.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/Common.js"></script>
  <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
  <script type="text/javascript" src="/js/jquery.datepick.min.js"></script>
  <script type="text/javascript" src="/js/jquery.datepick-zh-CN.js"></script>
  <script type="text/javascript">
    $(document).ready(
      function() {
        $("#FromDateTxt").datepick({ dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: '/images/icon/calendar-green.gif', buttonImageOnly: true });
        $("#ToDateTxt").datepick({ dateFormat: 'yy-mm-dd', showOn: 'button', buttonImage: '/images/icon/calendar-green.gif', buttonImageOnly: true });
      }
    );
    function batchFreeze() {
            confirmArrayId('datatable', 'hideBatchStudArrayId',',');
            $("#form1")[0].action = "/student/H.aspx?h=batchf&batchid=" + $("#hideBatchStudArrayId").val();
            $("#form1")[0].method="post";
            $("#form1")[0].submit();
      }
  </script>
    <style type="text/css">
        a{color:#333;text-decoration:none;font-size:10pt;cursor:pointer; } 
        a:hover {color:#CC3300;text-decoration:underline;font-size:10pt;}
        #ui-datepicker-div {
          z-index: 9999999!important;
        }
        .style1
        {
            border: solid 1px #9C9A9C;
            background-color: #EFEFEF;
            text-align: center;
            font-size: 10pt;
            vertical-align: middle;
            height: 20px;
            width: 8px;
        }
        .style2
        {
            border: solid 1px #9C9A9C;
            height: 20px;
            font-size: 9pt;
            width: 8px;
        }
        .style3
        {
            border: solid 1px #9C9A9C;
            background-color: #EFEFEF;
            text-align: center;
            font-size: 10pt;
            vertical-align: middle;
            height: 20px;
            width: 89px;
        }
        .style4
        {
            border: solid 1px #9C9A9C;
            height: 20px;
            font-size: 9pt;
            width: 89px;
        }
    </style>
</head>
<body>
  <form id="form1" method="post" action="?act=s">
    <div class="m_top"></div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;学员信息</div>
      </div>
      <div class="spe_line_2"></div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">姓名：</div>
        <div class="fl"><input type="text" id="UserNameTxt" name="UserNameTxt" value="<%=username %>" /></div>
        <div class="fl" style="line-height:23px;">&nbsp;Email：</div>
        <div class="fl"><input type="text" id="EmailTxt" name="EmailTxt" value="<%=email %>" /></div>
        <div class="fl" style="line-height:23px;">&nbsp;登录名：</div>
        <div class="fl"><input type="text" id="LoginIDTxt" name="LoginIDTxt" value="<%=loginid %>" /></div>
      </div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">报名机构：</div>
        <div class="fl">
          <% if (areaList != null && areaList.Count > 0) { %>
          <select id="AreaSlt" name="AreaSlt">
            <option value="-1">请选择</option>
            <% foreach (DictAreaModel areaModel in areaList) { %>
              <option value="<%=areaModel.ID %>"><%=areaModel.Name%></option>
            <% } %>
          </select>
          <% } %>
        </div>
        <div class="fl" style="line-height:23px;">&nbsp;证书或项目类别：</div>
        <div class="fl">
          <% if (certificateList != null && certificateList.Count > 0) { %>
          <select id="CertificateSlt" name="CertificateSlt">
            <% if (authority != E.Enum.EnumTeacherAuthority.Internals) { %>
            <option value="-1">请选择</option>
            <% } %>
            <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in certificateList) { %>
              <option value="<%=kvp.Key %>"><%=kvp.Value%></option>
            <% } %>
          </select>
          <% } %>
        </div>
        <div class="fl" style="line-height:23px;">&nbsp;状态：</div>
        <div class="fl">
          <select id="DelFlagSlt" name="DelFlagSlt">
            <option value="-1">请选择</option>
            <option value="0">正常</option>
            <option value="1">已冻结</option>
          </select>
        </div>
        <% if (authority == E.Enum.EnumTeacherAuthority.Admin) { %>
        <div class="fl" style="line-height:23px;">&nbsp;学员性质：</div>
        <div class="fl">
          <select id="PublicSlt" name="PublicSlt">
            <option value="-1">请选择</option>
            <option value="0">内训</option>
            <option value="1">外训</option>
          </select>
        </div>
        <% } %>
      </div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">入职时间：</div>
        <div class="fl"><input id="FromDateTxt" name="FromDateTxt" value="<%=fromDate %>" />&nbsp;至&nbsp;<input id="ToDateTxt" name="ToDateTxt" value="<%=toDate %>" /></div>
        <div class="fl"><input type="image" style="width:54px; height:23px;" src="/images/btn/search.gif" /></div>
      </div>
    </div>
    
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;搜索结果</div>
      </div>
      <div class="spe_line_2"></div>
      
    <% if (userList != null && userList.Count > 0) { %>
      <table id="datatable">
        <tr>
            <td class="style1"></td>
            <td class="HeadCell">登录名</td>
            <td class="style3">姓名</td>
            <td class="HeadCell">Email</td>
            <td class="HeadCell">性别</td>
            <td class="HeadCell">证书或项目</td>
            <td class="HeadCell">操作</td>
        </tr>
        
        <% foreach (UserListModel model in userList) { %>
        <tr>
            <td class="style2"><input type="checkbox" name="cbkSelect" value="<%=model.ID %>" /></td>
            <td class="ContentCell"><%=model.LoginID%></td>
            <td class="style4"><%=model.UserName.Equals("") ? "&nbsp;" : model.UserName%></td>
            <td class="ContentCell"><%=model.Email.Equals("") ? "&nbsp;" : model.Email%></td>
            <td class="ContentCell"><%=model.Gender ? "男" : "女"%></td>
            <td class="ContentCell"><%=model.SignedCertificateName%></td>
            <td class="ContentCell"><a href="/student/View.aspx?id=<%=model.ID %>">查看</a>&nbsp;<%=model.DelFlag ? "<a href=\"/student/H.aspx?h=a&id=" + model.ID + "\">激活</a>" : "<a href=\"/student/H.aspx?h=f&id=" + model.ID + "\">冻结</a>"%></td>
        </tr>
        
        <% } %>
        <tr>
            <td colspan="6">
                <div>
                    <a name="btnAll" id="btnAll" onclick="selectAll('datatable');">全选</a>&nbsp;
                    <a name="btnInverse" id="btnInverse" onclick="inverseAll('datatable');">反选</a>
                </div>
            </td>
            <td>
                <div>
                    <a name="btnBatchFreeze" id="btnBatchFreeze" onclick="batchFreeze();">批量冻结</a>
                </div>
            </td>
        </tr>
      </table>
      
      <div class="fr" style="margin:8px 0 0 0;"><%=mypager%></div>
      
    <% } else { %>
    <% } %>
    <input type="hidden" id="hideBatchStudArrayId" name="hideBatchStudArrayId" />
    </div>
  </form>
  <script type="text/javascript">
  <% if (areaid != -1)
     { %>
     document.getElementById("AreaSlt").value = <%=areaid %>;     
  <% } %>
  <% if (currentCertificateID != -1)
     { %>
     document.getElementById("CertificateSlt").value = <%=currentCertificateID %>;
  <% } %>
     document.getElementById("DelFlagSlt").value = '<%=delflag %>';
     document.getElementById("PublicSlt").value = '<%=publicInt %>';
  </script>
</body>
</html>
